Generalizing Movement Primitives To New Situations